Using Multiple "Single File Upload" in a single Page

Last post 01-29-2013, 12:25 PM by Kenneth. 3 replies.
Sort Posts: Previous Next
  •  12-11-2012, 7:49 AM 75440

    Using Multiple "Single File Upload" in a single Page

    Please update me on, can i use Multiple "Single File Upload" component in single page.

    and each uploader will update some hidden field associated with it.

    so that on page submission, i can get uploaded file names with correponding fields.

    Regards

    Jagmohan Tyagi

     

  •  12-12-2012, 7:31 AM 75450 in reply to 75440

    Re: Using Multiple "Single File Upload" in a single Page

    Hi Jagmohan,

     

    The asp uploader does not support to use multiple instances in the same page, I suggest you use Iframe taget to achieve it.

     

    Regards,

     

    Ken

  •  01-28-2013, 6:04 PM 76746 in reply to 75450

    Re: Using Multiple "Single File Upload" in a single Page

    Kenneth:

    Hi Jagmohan,

     

    The asp uploader does not support to use multiple instances in the same page, I suggest you use Iframe taget to achieve it.

     

    Regards,

     

    Ken

     

    Ken,

     

    Care to give us an example of how to achieve this? 

    I tried to modify the current sample of single file, but no luck.

     

    1. <%@ Language="VBScript" %>  
    2. <!-- #include file="aspuploader/include_aspuploader.asp" -->  
    3. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">  
    4. <html xmlns="http://www.w3.org/1999/xhtml">  
    5. <head>  
    6.     <title>  
    7.         Form - Single File Upload  
    8.     </title>  
    9.     <link href="demo.css" rel="stylesheet" type="text/css" />  
    10. </head>  
    11. <body>  
    12.     <div class="demo">  
    13.                           
    14.         <h2>Single File Upload</h2>  
    15.         <p> A basic sample demonstrating the use of the Upload control (Allowed file types: <span style="color:red">jpg, gif, png, zip, pdf</span>).</p>  
    16.           
    17.         Upload 1:  
    18.         <%  
    19.             Dim uploader  
    20.             Set uploader=new AspUploader  
    21.             uploader.Name="myuploader"  
    22.               
    23.             uploader.MaxSizeKB=4096  
    24.             uploader.InsertText="Upload File (Max 4MB)"  
    25.             uploader.AllowedFileExtensions="*.jpg,*.png,*.gif,*.zip,*.pdf"  
    26.             uploader.MultipleFilesUpload=false  
    27.               
    28.             'Where'd the files go?  
    29.             uploader.SaveDirectory=""  
    30.               
    31.             uploader.render()  
    32.         %>  
    33.           
    34.         <br/><br/>  
    35.         Upload 2:  
    36.         <%  
    37.             Dim uploader2  
    38.             Set uploader2=new AspUploader  
    39.             uploader2.Name="myuploader2"  
    40.               
    41.             uploader2.MaxSizeKB=4096  
    42.             uploader2.InsertText="Upload File (Max 4MB)"  
    43.             uploader2.AllowedFileExtensions="*.jpg,*.png,*.gif,*.zip,*.pdf"  
    44.             uploader2.MultipleFilesUpload=false  
    45.               
    46.             'Where'd the files go?  
    47.             uploader2.SaveDirectory=""  
    48.               
    49.             uploader2.render()  
    50.         %>  
    51.           
    52.         <br/><br/>  
    53.           
    54.               
    55.     <script type='text/javascript'>  
    56.     function CuteWebUI_AjaxUploader_OnTaskComplete(task)  
    57.     {  
    58.         alert(task.FileName + " is uploaded!");  
    59.     }  
    60.     </script>  
    61.                           
    62.     </div>  
    63. </body>  
    64. </html>  

     

  •  01-29-2013, 12:25 PM 76751 in reply to 76746

    Re: Using Multiple "Single File Upload" in a single Page

    Hi dcahya,

     

    Below is the example page. "form-multiplefiles.asp" is another page which contains the asp uploder.

     

    1. <%@  language="VBScript" %>  
    2. <!-- #include file="aspuploader/include_aspuploader.asp" -->  
    3. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">  
    4. <html xmlns="http://www.w3.org/1999/xhtml">  
    5. <head>  
    6.     <title>example  
    7.     </title>  
    8. </head>  
    9. <body>  
    10.     <div>  
    11.         <%  
    12.             Dim uploader  
    13.             Set uploader=new AspUploader  
    14.             uploader.Name="myuploader"  
    15.         %>  
    16.         <%=uploader.GetString() %>  
    17.     </div>  
    18.     <div>  
    19.         <iframe src="form-multiplefiles.asp" width="400" height="400"></iframe>  
    20.     </div>  
    21. </body>  
    22. </html>  
     

    Regards,

     

    Ken 

View as RSS news feed in XML